<?xml version="1.0" encoding="UTF-8" ?>
<%@ page language="java" contentType="application/rss+xml; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ page import="net.doglog.*" %>
<%@ page import="java.util.*" %>
<%
List<Post> posts = (List<Post>) request.getAttribute("posts");
if (posts == null) posts = new ArrayList<Post>();
%>
<rss version="2.0">
	<channel>
		<title><%= Blog.heading %></title>
		<link><%= Blog.link %></link>
		<description><%= Blog.subhead %></description>
		<language>zh-cn</language>
		<% for (Post post : posts) { %>
		<item>
			<title><%= post.getTitle() %></title>
			<link><%= Blog.link %>/post/<%= post.getId() %></link>
			<description><![CDATA[<%= post.getContent() %>]]></description>
			<pubDate><%= new Date(post.getTime()) %></pubDate>
			<guid><%= Blog.link %>/post/<%= post.getId() %></guid>
		</item>
		<% } %>
	</channel>
</rss>